import 'package:json_annotation/json_annotation.dart';

part 'logistics.g.dart';

@JsonSerializable()
class Logistics {
  @JsonKey(name: 'Traces')
  final List<Trace> traces;

  Logistics(this.traces);

  factory Logistics.fromJson(Map<String, dynamic> json) => _$LogisticsFromJson(json);

  Map<String, dynamic> toJson() => _$LogisticsToJson(this);
}

@JsonSerializable()
class Trace {
  @JsonKey(name: 'AcceptStation')
  final String acceptStation;
  @JsonKey(name: 'AcceptTime')
  final String acceptTime;

  Trace(this.acceptStation, this.acceptTime);

  factory Trace.fromJson(Map<String, dynamic> json) => _$TraceFromJson(json);

  Map<String, dynamic> toJson() => _$TraceToJson(this);
}
